﻿using BizTalk.ESB.Extensions.SSO.Common;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace BizTalk.ESB.Extensions.SSO.Data
{
    [DataContract]
    public class SsoApplication
    {
        string _ApplicationName = String.Empty;
        string _Description = String.Empty;
        string _AdminGroup = String.Empty;
        string _UserGroup = String.Empty;
        List<SsoConfigurationField> _PropertyBag = null;

        [DataMember]
        public string ApplicationName
        {
            get { return _ApplicationName; }
            set { _ApplicationName = value; }
        }
        [DataMember]
        public string Description
        {
            get { return _Description; }
            set { _Description = value; }
        }
        [DataMember]
        public string AdminGroup
        {
            get { return _AdminGroup; }
            set { _AdminGroup = value; }
        }
        [DataMember]
        public string UserGroup
        {
            get { return _UserGroup; }
            set { _UserGroup = value; }
        }

        [DataMember]
        public List<SsoConfigurationField> PropertyBag {
            get { return _PropertyBag; }
            set { _PropertyBag = value; }
        }
    }

    [DataContract]
    public class SsoConfigurationField
    {
        string _ConfigurationKey = String.Empty;
        string _ConfigurationValue = String.Empty;
        int _ConfigurationFlags;
        bool _ConfigurationEncrypted = false;
        bool _ConfigurationMasked = false;

        [DataMember]
        public string ConfigurationKey { 
            get { return _ConfigurationKey; }
            set { _ConfigurationKey = value; }
        }

        [DataMember]
        public string ConfigurationValue {
            get { return _ConfigurationValue; }
            set { _ConfigurationValue = value; }
        }

        [DataMember]
        public int ConfigurationFlags {
            get { return _ConfigurationFlags; }
            set { _ConfigurationFlags = value; }
        }

        [DataMember]
        public bool ConfigurationEncrypted {
            get { return _ConfigurationEncrypted; }
            set { _ConfigurationEncrypted = value; }
        }

        [DataMember]
        public bool ConfigurationMasked
        {
            get { return _ConfigurationMasked; }
            set { _ConfigurationMasked = value; }
        }
    }
}
